open Repertoire
open Printf


let _ =

print_endline "\nadd_list 4 [1;2;3;5] 0.5p";
let add = add_list 4 [1;2;3;5] in
List.iter (fun x -> print_endline (string_of_int x)) add;

print_endline "\nadd_list 4 [1;2;3;4;5] 0.5p";
let add = add_list 4 [1;2;3;4;5] in
List.iter (fun x -> print_endline (string_of_int x)) add;


print_endline "\nremove_list 4 [1;2;3;4;5] 1p";
let rm = remove_list 4 [1;2;3;4;5] in
List.iter (fun x -> print_endline (string_of_int x)) rm;

print_endline "\nexist 4 [1;2;3;5] 0.5p";
let ex = exist 4 [1;2;3;5] in
print_endline (string_of_bool ex);

print_endline "\nexist 4 [1;2;3;4;5] 0.5p";
let ex = exist 4 [1;2;3;4;5] in
print_endline (string_of_bool ex);

print_endline "\nmap (function x -> x + 1) [1;3;5;7;11] 1p";
let mp = map (function x -> x + 1) [1;3;5;7;11] in
List.iter (fun x -> print_endline (string_of_int x)) mp;

print_endline "\niter (print_int) [1;3;5;7;11] 1p";
iter (fun x -> print_endline (string_of_int x)) [1;3;5;7;11];
List.iter (fun x -> print_endline (string_of_int x)) [1;3;5;7;11];

print_endline "\nfor_all (function x -> x = 0) [0;0;0;0;0] 1p";
let fa = for_all (function x -> x = 0) [0;0;0;0;0] in
print_endline (string_of_bool fa);

let string_of_char c = 
    String.make 1 c in

print_endline "\nupper_case 'c' 0.25p";
let c = upper_case 'c' in 
print_endline (string_of_char c);

print_endline "\nupper_case 'C' 0.25p";
let c = upper_case 'C' in
print_endline (string_of_char c);

print_endline "\nlower_case 'C' 0.25p";
let c = lower_case 'C' in
print_endline (string_of_char c);

print_endline "\nlower_case 'c' 0.25p";
let c = lower_case 'c' in
print_endline (string_of_char c);

print_endline "\nstring_uppercase Hello 0.75p";
let str = string_uppercase "Hello" in
print_endline str;

print_endline "\nstring_uppercase HELLO 0.75p";
let str = string_uppercase "HELLO" in
print_endline str;

print_endline "\nstring_lowercase Hello 0.75p";
let str = string_lowercase "Hello" in
print_endline str;

print_endline "\nstring_lowercase hello 0.75p";
let str = string_lowercase "hello" in
print_endline str
